<template name="kongyemian">
	<view>
		<view class="imgbox" v-if="!isLoding || (!isLogin)">
			<image src="../static/wutongzhi.png" mode=""></image>
			<text>{{wenzishow[type].text}}</text>
		</view>
		<view class="loding" v-if="isLoding && isLogin">
			<view class="circle">
				<text class="iconfont icon-loading"></text>
			</view>
			<text class="tt">正在加载中...</text>
		</view>
	</view>
</template>

<script>
	import {
		mapState,
		mapGetters,
		mapMutation,
		mapActions
	} from 'vuex';
	export default {
		computed: {
			...mapState({
				userInfo: state => state.user.userInfo,				
				isLogin: state => state.user.isLogin
			})
		},
		name: "kongyemian",
		props: {
			type: {
				type: String,
				default: 'data'
			},
			isLoding: {
				type: Boolean,
				default: false
			}
		},
		data() {
			return {
				wenzishow: {
					data: {
						text: "暂无通知"						
					},
					shujv: {
						text: "暂无数据"					
					},
					kebiao: {
						text: "暂无课表"					
					},
					food:{
						text:"暂无食谱"
					},
					xiaoxi:{
						text:"暂无消息"
					},
					wenjuan:{
						text:"暂无问卷"
					}
					
				}
				

			};
		},
		created() {
			// console.log(this.isLoding)
			// console.log(this.isLogin)
		}
		
	}
</script>

<style lang="less">
	.imgbox {
		display: flex;
		text-align: center;
		flex-direction: column;
		color: #7dd2ef;
		font-size: 25rpx;
		position: absolute;
		left: 50%;
		top: 50%;
		transform: translateX(-50%) translateY(-50%);

		image {
			width: 300rpx;
			height: 191rpx;
			margin-bottom: 8rpx;
		}

		text {
			width: 300rpx;
			letter-spacing: 1em
		}
	}

	.loding {
		display: flex;
		align-items: center;
		justify-content: center;
		padding: 50upx 0;

		.circle {
			width: 40upx;
			height: 40upx;
			display: flex;
			align-items: center;
			justify-content: center;
			transform: rotate(0deg);
			animation-name: xuanzhuan;
			animation-duration: 2s;
			animation-iteration-count: infinite;
			animation-timing-function: linear;
			animation-delay: 0s;
		}

		.iconfont {
			font-size: 40upx;
			line-height: 40upx;
			// transform: rotate(0deg);
			// font-weight: bold;
			color: #ffb423;

		}

		.tt {
			margin-bottom: 0;
			margin-left: 20upx;
			font-size: 28upx;
			color: #c3c9d6;
		}
	}
</style>
